/**
 * Xtable API
 */
import axios from './index'

const searchUser = () => {
  return axios({
    url: '/api/adminApi/user/searchUser',
    method: 'post'
  })
}

const addUser = (params) => {
  return axios({
    url: '/api/adminApi/user/addUser',
    method: 'post',
    data: params
  })
}

const delUser = (params) => {
  return axios({
    url: '/api/adminApi/user/delUser',
    method: 'post',
    data: params
  })
}
const updateUser = (params) => {
  return axios({
    url: '/api/adminApi/user/updateUser',
    method: 'post',
    data: params
  })
}

const loginChecked = (params) => {
  return axios({
    url: '/api/adminApi/user/loginChecked',
    method: 'post',
    data: params
  })
}

const updateUserInfo = (params) => {
  return axios({
    url: '/api/adminApi/user/updateUserInfo',
    method: 'post',
    data: params
  })
}

export {
  addUser,
  delUser, searchUser, updateUser, loginChecked, updateUserInfo
}
